﻿using System;
using Framework;

namespace Enterprise.Admin.Handle
{
    public partial class GetRecruitmentDetailJson : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var id = Fq("id").SafeToInt();
            var recruitmentService = new RecruitmentService();
            var row = recruitmentService.GetById(id);
            object result = new
                                {
                                    CoRecruitmentId = row["CoRecruitmentId"].SafeToString(),
                                    CoPost = row["CoPost"].SafeToString(),
                                    CoPostDescription = row["CoPostDescription"].SafeToString(),
                                    CoNumber = row["CoNumber"].SafeToString(),
                                    CoMonthlySalary = row["CoMonthlySalary"].SafeToString(),
                                    CoWorkPlace = row["CoWorkPlace"].SafeToString(),
                                    CoWorkExperience = row["CoWorkExperience"].SafeToString(),
                                    CoEducation = row["CoEducation"].SafeToString(),
                                    CoAge = row["CoAge"].SafeToString(),
                                    CoDate = row["CoDate"].SafeToDateTime().ToString("yyyy-MM-dd HH:mm:ss"),
                                    CoValidDate = row["CoValidDate"].SafeToDateTime().ToString("yyyy-MM-dd HH:mm:ss"),
                                    CoLanguage = row["CoLanguage"].SafeToString(),
                                    CoAssess = row["CoAssess"].SafeToString(),
                                    CoCandidates = row["CoCandidates"].SafeToString(),
                                    CoEmail = row["CoEmail"].SafeToString(),
                                    CoContact = row["CoContact"].SafeToString(),
                                    CoOtherTreatment = row["CoOtherTreatment"].SafeToString(),
                                    CoQq = row["CoQq"].SafeToString(),
                                    CoWorkType = row["CoWorkType"].SafeToString(),
                                    CoSex = row["CoSex"].SafeToString()
                                };

            Json(result);
        }
    }
}